<?php

namespace app\api\controller;

use app\api\model\Banner as BannerModel;
use app\BaseController;

class Banner extends BaseController
{
    /* 获取 */
    public function index()
    {
        $cid = input('cid', 0, 'intval');
        $type = input('type', '');
        $data = BannerModel::where('cid', $cid)->value($type);
        $data = unserialize($data);
        return show(config('status.success'), '获取轮播图', $data);
    }
}
